﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace Repositories.Interfaces
{
	public interface IMealRepository : IBaseRepository<Meal>
	{
        /// <summary>
        /// Creates the Meal.
        /// </summary>
        /// <param name="item">The item.</param>
        void CreateMeal(Meal item);

        /// <summary>
        /// Queries the Meal.
        /// </summary>
        /// <param name="predicate">The predicate.</param>
        /// <returns>Query results.</returns>
        IQueryable<Meal> QueryMeal(Expression<Func<Meal, bool>> predicate);

        /// <summary>
        /// Finds the by ID.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns>The Meal with input ID.</returns>
        Meal FindById(int id);

        /// <summary>
        /// Gets all Meal.
        /// </summary>
        /// <returns>all Meal.</returns>
        List<Meal> GetAllMeal();

        /// <summary>
        /// Get All Category For DropDownList
        /// </summary>
        List<Category> GetAllCategoriesForDropDownList();

        List<Meal> GetAllMealByCategory(int categoryId);

        List<Meal> GetAllMealByGorup(int groupId);

        /// <summary>
        /// Get All Category For DropDownList
        /// </summary>
        List<Category> GetAllCategorysForDropDownList();

        /// <summary>
        /// Edits the Meal.
        /// </summary>
        /// <param name="item">The item.</param>
        void EditMeal(Meal item);


        /// <summary>
        /// Deletes the Meal.
        /// </summary>
        /// <param name="item">The item.</param>
        void DeleteMeal(Meal item);

        /// <summary>
        /// Deattaches the specified Meal.
        /// </summary>
        /// <param name="solicitation">The Meal.</param>
        void DeattachTo(Meal combo);

      
        /// <summary>
        /// Deattaches the specified category.
        /// </summary>
        /// <param name="category">The category.</param>
        void Deattach(Category category);


        /// <summary>
        /// Deattaches the specified GroupMeal.
        /// </summary>
        /// <param name="category">The GroupMeal.</param>
        void Deattach(GroupMeal gorupMeal);

        /// <summary>
        /// Applies the changes to database.
        /// </summary>
        void ApplyTheChanges();

        /// <summary>
        /// Accepts all changes.
        /// </summary>
        void AcceptAllChanges();

        /// <summary>
        /// Refreshes this instance.
        /// </summary>
        void Refresh();
	}
}
